package com.agiantii.ablog.strategy.impl;

import com.agiantii.ablog.mapper.PostMapper;
import com.agiantii.ablog.pojo.vo.PostVO;
import com.agiantii.ablog.strategy.SearchStrategy;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;

@Component("TITLE")
public class TitleSearchStrategy implements SearchStrategy {
    
    @Resource
    private PostMapper postMapper;
    
    @Override
    public List<PostVO> search(String keyword) {
        return postMapper.findByTitleLike(keyword);
    }
} 